package com.bbj.ch6_ploymorphic;

/**
 * Created with IntelliJ IDEA.
 *
 * @Author: jack_yang
 * @Date: 2024/4/29
 * @Description: addition and subtraction
 */
public class MainTest {
    public static void main(String[] args) {
//        Pet pet1 = new Cat();
//        pet1.eat();
//        Pet pet2 = new Dog();
//        pet2.eat();
//        Pet pet1 = new Cat();
//        pet1.eat();
//        Cat cat = (Cat) pet1;
//        cat.eat();
//        cat.playBall();
        Master master = new Master();
        Pet pet =  master.getPet(1);
        master.feed(pet);
        master.play(pet);


    }
}
